#include "PowerUps.h"

#include "GameObject.h"
#include "Player.h"

#include "..\Message Management\CreateAddPowerUpMessage.h"
#include "..\Message Management\MessageID.h"
#include "..\Game.h"

PowerUps::PowerUps() : Message(MessageID::MSG_ADD_POWER_UP)
{
	iHPPowerUp = iDamagePowerUp = 0;
	fSpeedPowerUp = 0.0f;
}

PowerUps::~PowerUps()
{

}

int PowerUps::Update(float dt)
{
	return 0;
}

void PowerUps::Render()
{
	StationaryObject::Render();
}

void PowerUps::HandleCollision(const GameObject* collision)
{
	if (collision->GetID() == ObjectID::PLAYER)
	{
		GAME->PlayPickupAudio();
		// Send Add Power Up Message
		CreateAddPowerUpMessage* psMsg = new CreateAddPowerUpMessage(this);
		psMsg->QueueMessage();
		psMsg = nullptr;
	}
}

// Accessors
int PowerUps::GetHPPowerUp()const
{
	return iHPPowerUp;
}

int PowerUps::GetDamagePowerUp()const
{
	return iDamagePowerUp;
}

float PowerUps::GetSpeedPowerUp()const
{
	return fSpeedPowerUp;
}

// Mutators
void PowerUps::SetHPPowerUp(int iHP)
{
	iHPPowerUp = iHP;
}

void PowerUps::SetDamagePowerUp(int iDamage)
{
	iDamagePowerUp = iDamage;
}

void PowerUps::SetSpeedPowerUp(float fSpeed)
{
	fSpeedPowerUp = fSpeed;
}